const options = [
  {
    text: "浙江省",
    value: "330000",
    children: [{ text: "杭州市", value: "330100" }],
  },
  {
    text: "江苏省",
    value: "320000",
    children: [{ text: "南京市", value: "320100" }],
  },
];

Page({
  data: {
    show: false,
    options,
    fieldValue: "330100",
    cascaderValue: "320100",
  },

  onClick() {
    this.setData({
      show: true,
    });
  },

  onClose() {
    this.setData({
      show: false,
    });
  },

  onFinish(e) {
    const { selectedOptions, value } = e.detail;
    console.log(selectedOptions, value);
    const fieldValue = selectedOptions
      .map((option) => option.text || option.name)
      .join("/");
    this.setData({
      fieldValue,
      cascaderValue: value,
    });
	},
	

});
